<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- <meta name="viewport" content="width=device-width,initial-scale=1.0"> -->
    <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">

    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
    <title><%= htmlWebpackPlugin.options.title %></title>
  </head>
  <body>
    <noscript>
      <!-- <strong>We're sorry but xxxx doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> -->
      <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
    </noscript>
    <div id="app"></div>
    <!-- built files will be auto injected -->
    <script>
      document.body.fontSize = document.documentElement.style.fontSize;
      var html = document.getElementsByTagName('html')[0];
      var settedFs = settingFs = document.documentElement.style.fontSize;
      var realFs = parseInt(window.getComputedStyle(html).fontSize);
      var whileCount = 0;
      var docEl = document.documentElement 
      window.addEventListener('pageshow', function (e) {
        console.log('realFs:',realFs, docEl.clientWidth);
        
        if (realFs > (docEl.clientWidth / 10)) {
          // 100 * fontSize = (clientWidth * clientWidth) / old_fontSize 
          let fs = (docEl.clientWidth / (realFs / (docEl.clientWidth / 10)) / 10);
          console.log('fs:',fs);
          docEl.style.fontSize =
            html.setAttribute('style', 'font-size:' + fs + 'px!important');
        }
      })
    </script>
  </body>
 
</html>
